<html>
<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>MixIO</title>
    <link rel="shortcut icon" href="img/shortcut.png"/>
    <!-- Custom fonts for this template-->
    <link rel="stylesheet" href="css/all.css">
        <!-- Bootstrap core JavaScript-->
    <script src="js/jquery.min.js"></script>
    <script src="js/lang.js"></script>
    <script src="js/farbtastic.js"></script>
    <script src="js/bootstrap.bundle.min.js"></script>

    <!-- Core plugin JavaScript-->
    <script src="js/jquery.easing.min.js"></script>

    <!-- Custom scripts for all pages-->
    <script src="js/echarts.min.js"></script>
    <script src="js/jquery.easyui.min.js"></script>
    <script src="js/mqtt.min.js"></script>
    <link rel="stylesheet" href="css/dataTables.bootstrap4.min.css">
    <script src="js/jquery.dataTables.min.js"></script>
    <script src="js/dataTables.bootstrap4.min.js"></script>
    <script src="js/tools.js"></script>
    <script src="js/apps.js?v=6"></script>
</head>
<body id="page-top" class="sidebar-toggled">

    <!-- Page Wrapper -->
    <div id="wrapper">

        <!-- Sidebar -->
        <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">

            <!-- Sidebar - Brand -->
            <a class="sidebar-brand d-flex align-items-center justify-content-center">
                <div class="sidebar-brand-icon">
                    <img src="img/logo.png" style="width:35px" alt="">
                </div>
                <div class="sidebar-brand-text mx-3" >MixIO</div>
            </a>

            <!-- Divider -->
            <hr class="sidebar-divider my-0">

            

            <!-- Nav Item - Dashboard -->

            <!-- Divider -->
            <hr class="sidebar-divider">

            <!-- Heading -->
            <div class="sidebar-heading lang" key="MANAGE">
            </div>
            <li class="nav-item">
                <a class="nav-link" href="projects" id="manage_prj">
                    <i class="fa fa-fw fa-tachometer"></i>
                    <span class="lang" key="PROJECTSMANAGE"></span></a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="mqttdata" id="manage_data">
                    <i class="fa fa-fw fa-table"></i>
                    <span class="lang" key="DATAMANAGE"></span></a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="tinydata" id="tiny_data">
                    <i class="fa fa-fw fa-database"></i>
                    <span>Tiny DB</span></a>
            </li>
            <li class="nav-item active">
                <a class="nav-link" href="webapps" id="share_app">
                    <i class="fa fa-fw fa-share"></i>
                    <span class="lang" key="SHAREMANAGE"></span></a>
            </li>

            <hr class="sidebar-divider">
            <div class="sidebar-heading lang" key="SETTINGS">
            </div>
            <li class="nav-item">
                <a class="nav-link" href="logout">
                    <i class="fa fa-fw fa-arrow-circle-left"></i>
                    <span class="lang" key="LOGOUT"></span></a>
            </li>

           

            <!-- Divider -->
            <hr class="sidebar-divider d-none d-md-block">

            <!-- Sidebar Toggler (Sidebar) -->
            <div class="text-center d-none d-md-inline">
                <button class="rounded-circle border-0" id="sidebarToggle"></button>
            </div>

        </ul>
        <!-- End of Sidebar -->

        <!-- Content Wrapper -->
        <div id="content-wrapper" class="d-flex flex-column">

            <!-- Main Content -->
            <div id="content">

                <!-- Topbar -->
                <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow" style="display:flex;justify-content:space-between">
                    <div style="display:flex;align-items:center;justify-content:center">
                    <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
                            <i class="fa fa-bars"></i>
                        </button> 
                    <h1 class="d-sm-inline-block h3 mb-0 text-gray-800 lang" key="SHAREMANAGE" style="margin-left:10px;font-size:1.5rem;display:inline-block;cursor:pointer"></h1>
                    </div>
                </nav>
                <div class="container-fluid" id="project_list">
                <div class="card shadow mb-4" >
                        <div class="card-body" style="overflow:auto">
                        <table id="apps_table" class="table table-striped table-bordered" style="width:100%"> 
                        <thead>
                            <tr>
                                <th class="lang" key="SRCPRJNAME"></th>
                                <th class="lang" key="SHARETIME"></th>
                                <th class="lang" key="AUCODE"></th>
                                <th class="lang" key="STATUSNOW"></th>
                                <th class="lang" key="USEDTIME"></th>
                                <th class="lang" key="OPTIONS"></th>
                            </tr>
                        </thead>
                        <tbody>
                            <% rows.forEach(function(row){ %>
                                        <tr>
                                            <td style="vertical-align:middle"><%=row['projectName']%></td>
                                            <td style="vertical-align:middle"><%=row['timeStamp']%></td>
                                            <td style="vertical-align:middle"><b><%=row['shareid']%></b></td>
                                            <td class="lang" key="<%=(row['status']==1?"ONSHARE":"OFFSHARE")%>" style="vertical-align:middle;color:<%=(row['status']==1?"#1cc88a":"e74a3b")%>"></td>
                                            <td style="vertical-align:middle"><%=row['shareCount']%></td>
                                            <td style="vertical-align:middle">
                                            <a class="btn btn-sm btn-info btn-circle" onclick="view_share('<%=row['shareid']%>')" style="margin-right:10px"><i class="fa fa-share" style="font-size:1rem"></i></a>
                                            <a class="btn btn-sm btn-warning btn-circle" onclick="pause_share('<%=row['shareid']%>')" style="margin-right:10px" <%=(row['status']==1?"":"hidden")%>><i class="fa fa-pause" style="font-size:0.8rem"></i></a>
                                            <a class="btn btn-sm btn-success btn-circle" onclick="play_share('<%=row['shareid']%>')" style="margin-right:10px" <%=(row['status']==0?"":"hidden")%>><i class="fa fa-play" style="font-size:0.8rem;margin-left:2px"></i></a>
                                            <a class="btn btn-sm btn-danger btn-circle" onclick="delete_share('<%=row['shareid']%>')" style="margin-right:10px"><i class="fa fa-trash" style="font-size:1rem"></i></a></td>
                                        </tr>
                            <% }); %>
                        </tbody>
                        </table>
                        </div>
                    </div>
                </div>
            </div>
            <footer class="sticky-footer bg-white">
            <div class="container my-auto">
                <div class="copyright text-center my-auto">
                    <a href="//mixly.org" target="_blank" class="d-none d-md-block" style="margin-right:30px;color:gray;font-size:0.7rem;user-select:none">
                        Copyright© Mixly Team @ BNU, CHINA
                    </a> 
                </div>
            </div>
    </footer>
        </div>
    
    <!-- End of Page Wrapper -->


    

    <!-- Page level custom scripts -->
    <script src="js/sb-admin-2.min.js?v=2"></script>
</body>

</html>